package com.itheima.dao;

import com.itheima.domain.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface StudentDao {

    @Select("select * from student")
    List<Student> findAll();

    @Select("select * from student where id=#{id}")
    Student findById(Integer id);

    @Insert("insert into student values(null,#{name},#{age})")
    Integer save(Student student);
}
